/*
  StandInstance.h - 
  
  Created by the STA team at UMBC on 24 January 2013. 
  Edited (very slightly) by the LSI team at UMBC on 7 March 2014.
*/

// ensure this library description is only included once
#ifndef StandInstance_h
#define StandInstance_h

#include "StepperDriver.h"

// library interface description
class StandInstance {

	public:
  		StandInstance(int azInitPos, int elInitPos);
      	void moveTo(int newAz, int newEl);
      	int moveToSimultaneous(int newAz, int newEl);
	  	int moveToAccel(int newAz, int newEl, bool nhmode=true);
	  	int moveAccelerate(long azSteps, int azStartingSPS, int azSPSPS, int azStepMode, long elSteps, int elStartingSPS, int elSPSPS, int elStepMode);
      	long stepAzimuth(long steps);
      	long stepElevation(long steps);
      	void resetPosition();
      	int getAzimuth();
      	int getElevation();
      	long azDegToStep(int degrees);
      	long elDegToStep(int degrees);
      	bool isValidAzPos(int newAz);
      	bool isValidElPos(int newEl);

	private:
		StepperDriver *azDriver;
		StepperDriver *elDriver;
		void updatePosition(int newAz, int newEl);
      
		int azPos;
		int elPos;
     

};

#endif

